package com.dark.cms.system.login.web;

import com.dark.cms.base.dto.BaseDTO;
import com.dark.cms.base.dto.ResDTO;
import com.dark.cms.base.web.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 登录控制器,处理登录，退出功能
 * Created by Devil on 2015/1/27.
 */
@Controller
public class LoginController extends BaseController{
    private static final int TYPE = 1;

    @RequestMapping(value = "/login/{loginid}/{password}", method = RequestMethod.POST)
    public String loginJump(@PathVariable("loginid") String loginid, @PathVariable("password") String password){
        System.out.println(loginid + " " + password);
        return viewName("login", TYPE);
    }

    @RequestMapping(value = "/login", method = RequestMethod.GET)
    public @ResponseBody
    Map login(Map dto){
        return dto;
    }
}
